﻿CREATE TABLE [dbo].[Event] (
    [Id]             UNIQUEIDENTIFIER NOT NULL,
    [Title]          NVARCHAR (200)   NULL,
    [Description]    NVARCHAR (4000)  NULL,
    [HTML]           NVARCHAR (MAX)   NULL,
    [CategoryId]     UNIQUEIDENTIFIER NULL,
    [CreateAt]       DATETIME2 (3)    NOT NULL,
    [ActAt]          DATETIME2 (3)    NOT NULL,
    [Locale]         NVARCHAR (500)   NULL,
    [Audience]       NVARCHAR (50)    NULL,
    [Remark]         NVARCHAR (500)   NULL,
    [Status]         INT              NOT NULL,
    [Charge]         MONEY            NOT NULL,
    [Visits]         INT              NULL,
    [Cover]          NVARCHAR (2048)  NULL,
    [UserId]         UNIQUEIDENTIFIER NOT NULL,
    [Retrospect]     NVARCHAR (4000)  NULL,
    [RetrospectHTML] NVARCHAR (MAX)   NULL,
    CONSTRAINT [PK_Event] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Event_Category] FOREIGN KEY ([CategoryId]) REFERENCES [dbo].[Category] ([Id]),
    CONSTRAINT [FK_Event_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
);















